package com.jxbai.design.pattern.dcxy.adapter.clazz;

import com.jxbai.design.pattern.dcxy.adapter.Player;
import com.jxbai.design.pattern.dcxy.adapter.Zh_JPTranslator;

/**
 * @author jxbai
 * @date 2022/1/12 0012
 */
public class JPMoviePlayerAdapter extends Zh_JPTranslator implements Player {

    private Player target;

    public JPMoviePlayerAdapter(Player target) {
        this.target = target;
    }

    @Override
    public String play() {
        String play = target.play();
        //转换字幕
        String translate = translate(play);
        System.out.println("日文："+translate);
        return play;
    }
}
